import request from '@/utils/request'
// import axios from 'axios'
import { apiVersion } from '@/config'

// 获取详情
export function getMarketAlgorithmVersionDetail(data) {
    return request({
        url: `/admin/${apiVersion}/marketAlgorithmVersion/${data.id}`,
        method: 'get',
        data
    })
}
export function getMarketAlgorithmPreviewVersionDetail(data) {
    return request({
        url: `/admin/${apiVersion}/marketAlgorithmVersion/${data.id}/preview`,
        method: 'get',
        data
    })
}
// 分页列表
export function getMarketAlgorithmVersions(data) {
    return request({
        url: `/admin/${apiVersion}/marketAlgorithmVersion`,
        method: 'get',
        data
    })
}
// 获取待审核
export function getAuditMarketAlgorithmVersions(data) {
    return request({
        url: `/admin/${apiVersion}/marketAlgorithmVersion/audit/init`,
        method: 'get',
        data
    })
}
// 删除
export function delMarketAlgorithmVersion(data) {
    return request({
        url: `/admin/${apiVersion}/marketAlgorithmVersion/${data.id}`,
        method: 'delete',
        data
    })
}
// 创建
export function addMarketAlgorithmVersion(data) {
    return request({
        url: `/admin/${apiVersion}/marketAlgorithmVersion`,
        method: 'post',
        data
    })
}
export function putMarketAlgorithmVersion(data) {
    return request({
      url: `/admin/${apiVersion}/marketAlgorithmVersion`,
      method: 'put',
      data: data
    })
  }
// 查询列表
export function getAllMarketAlgorithmVersions(data) {
    return request({
        url: `/admin/${apiVersion}/marketAlgorithmVersion/all`,
        method: 'get',
        data
    })
}
// 我的发布列表
export function getMyMarketAlgorithmVersions(data) {
    return request({
        url: `/admin/${apiVersion}/marketAlgorithmVersion/my`,
        method: 'get',
        data
    })
}